# -*- coding: utf-8 -*-
# @File  : app01.py
# @Author:  liubinyu
# @Time: 2024/5/19 11:39
from typing import Union, Optional

from fastapi import APIRouter, Request

app06 = APIRouter()

@app06.get("/items")
async def items(request: Request):
    return {
        "请求URL：": request.url,
        "请求ip：": request.client.host,
        "请求宿主：": request.headers.get("user-agent"),
        "cookies": request.cookies,
    }
